<?php
require_once('Extension/Controller/Plugin/Abstract.php');

class Extension_Controller_Plugin_Common_ModulePlugins extends Extension_Controller_Plugin_Abstract
{
    //public function routeStartup(Zend_Controller_Request_Abstract $request) {}

    public function routeShutdown(Zend_Controller_Request_Abstract $request)
    {
        Kbs::initPlugin($request->getModuleName());
    }

    //public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) {}
    //public function preDispatch(Zend_Controller_Request_Abstract $request) {}
    //public function postDispatch(Zend_Controller_Request_Abstract $request) {}
    
    public function dispatchLoopShutdown()
    {
        $debug = 0;

        if ($debug) {
            $plugins = Zend_Controller_Front::getInstance()->getPlugins();
            foreach ($plugins as $index => $plugin) {
                echo $index , ' : ' . get_class($plugin) . '<br />';

            }
        }
    }
}